<?php

namespace Mssae\SeoBundle\Entity;

use Mssae\UserBundle\MssaeUserBundle ;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Validator\Constraints as Assert;
/**
 * Mssae\SeoBundle\Entity\Projet
 *
 * @ORM\Table()
 * @ORM\Entity(repositoryClass="Mssae\SeoBundle\Entity\ProjetRepository")
 */
class Projet
{
    /**
     * @var integer $id
     *
     * @ORM\Column(name="id", type="integer")
     * @ORM\Id
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * @var string $nom
     *
     * @ORM\Column(name="nom", type="string", length=255)
     * @Assert\NotBlank()
     * @Assert\MinLength(limit = 3)
     */
    private $nom;

    /**
     * @var string $url
     *
     * @ORM\Column(name="url", type="string", length=255)
     * @Assert\Url()
     */
    private $url;

    /**
     * @var string $client
     *
     * @ORM\Column(name="client", type="string", length=255)
     * @Assert\MinLength(limit = 3)
     */
    private $client;

    /**
     * @var text $commentaire
     *
     * @ORM\Column(name="commentaire", type="text")
     * @Assert\NotBlank()
     */
    private $commentaire;

    /**
     * @var datetime $create_at
     *
     * @ORM\Column(name="create_at", type="datetime")
     * @Assert\DateTime()
     */
    private $create_at;

    /**
     * @var smallint $statut
     *
     * @ORM\Column(name="statut", type="smallint")
     * @Assert\Min(0)
     * @Assert\Max(1)
     */
    private $statut;

    /**
     * @ORM\ManyToMany(targetEntity="Mssae\UserBundle\Entity\User")
     */
    protected $user ;

    /**
     * Get id
     *
     * @return integer 
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set nom
     *
     * @param string $nom
     */
    public function setNom($nom)
    {
        $this->nom = $nom;
    }

    /**
     * Get nom
     *
     * @return string 
     */
    public function getNom()
    {
        return $this->nom;
    }

    /**
     * Set url
     *
     * @param string $url
     */
    public function setUrl($url)
    {
        $this->url = $url;
    }

    /**
     * Get url
     *
     * @return string 
     */
    public function getUrl()
    {
        return $this->url;
    }

    /**
     * Set client
     *
     * @param string $client
     */
    public function setClient($client)
    {
        $this->client = $client;
    }

    /**
     * Get client
     *
     * @return string 
     */
    public function getClient()
    {
        return $this->client;
    }

    /**
     * Set commentaire
     *
     * @param text $commentaire
     */
    public function setCommentaire($commentaire)
    {
        $this->commentaire = $commentaire;
    }

    /**
     * Get commentaire
     *
     * @return text 
     */
    public function getCommentaire()
    {
        return $this->commentaire;
    }

    /**
     * Set create_at
     *
     * @param datetime $createAt
     */
    public function setCreateAt($createAt)
    {
        $this->create_at = $createAt;
    }

    /**
     * Get create_at
     *
     * @return datetime 
     */
    public function getCreateAt()
    {
        return $this->create_at;
    }

    /**
     * Set statut
     *
     * @param smallint $statut
     */
    public function setStatut($statut)
    {
        $this->statut = $statut;
    }

    /**
     * Get statut
     *
     * @return smallint 
     */
    public function getStatut()
    {
        return $this->statut;
    }
    public function __construct()
    {
        $this->user = new \Doctrine\Common\Collections\ArrayCollection();
        $this->create_at = new \DateTime() ;        
    }
    
    /**
     * Add user
     *
     * @param Mssae\UserBundle\Entity\User $user
     */
    public function addUser(\Mssae\UserBundle\Entity\User $user)
    {
        $this->user[] = $user;
    }

    /**
     * Get user
     *
     * @return Doctrine\Common\Collections\Collection 
     */
    public function getUser()
    {
        return $this->user;
    }
    public function __toString()
    {
        return $this->nom ;
    }
}